
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php


$subject_id = $_POST['subject_id'];
$subject_name = $_POST['subject_name'];
$subject_detail = $_POST['subject_detail'];
$old_id = $_POST['old_id'];

$newdata = array(
   "subject_id"=>$subject_id,
   "subject_name"=>$subject_name,
   "subject_detail"=>$subject_detail,
);
	
$dbfunc->update("tb_subject",$newdata,"subject_id = '{$subject_id}'");
$dbfunc->query("UPDATE tb_subject SET subject_id='{$subject_id}',subject_name='{$subject_name}',subject_detail='{$subject_detail}' WHERE subject_id='{$old_id}'");
echo "<center>ระบบทำการแก้ไขข้อมูลของคุณแล้วค่ะ";
echo mysql_error();
echo $func->redirect("1","?module=admin&page=frm_mag_subject&pos=01");
?>
